<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Options</title>
        <link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
    </h:head>
    <h:body>
        <ui:composition >
           
            <p:tabView >
                <p:tab title="General">
                    <!--<ui:include src="/system/themes.xhtml"/> -->
                    <h:form>
                        <h:inputHidden value="#{usersConfigBean.usersConfig.userId}"/>
			<p:toolbar>
                            <p:toolbarGroup align="left">
                                <p:commandButton value="#{bundle.btnSave}" image="ui-icon-disk" action="#{usersConfigBean.applyConfig()}">
                                </p:commandButton>                       
                            </p:toolbarGroup>
			</p:toolbar>
                    
                    <h:panelGrid columns="2" cellpadding="10">                        
                        <h:outputText value="Bahasa"/>
                        <!--<p:selectOneMenu style="width: 170px" valueChangeListener="#{localeBean.chooseLocaleFromLink}" value="#{usersConfigBean.usersConfig.locale}">-->
                        <p:selectOneMenu style="width: 170px" immediate="true" valueChangeListener="#{language.countryLocaleCodeChanged}" value="#{usersConfigBean.usersConfig.locale}">
                           <f:selectItem itemLabel="Indonesia" itemValue="id"/>
                           <f:selectItem itemLabel="English" itemValue="en"/>
                        </p:selectOneMenu>
                        <h:outputText value="Themes:" />        
                        <p:themeSwitcher style="width:150px" effect="fade" var="t" id="themePreview" value="#{usersConfigBean.usersConfig.themes}">  
                            <f:selectItem itemLabel="Choose Theme" itemValue="" />  
                            <f:selectItems value="#{themeSwitcherBean.advancedThemes}" var="theme" itemLabel="#{theme.jarName}" itemValue="#{theme}"/>  
                            <p:column>  
                                <p:graphicImage value="#{t.image}" width="90" height="60"/>  
                            </p:column>  
                            <p:column>  
                                #{t.jarName}  
                            </p:column>  
                        </p:themeSwitcher> 
                    </h:panelGrid> 
                        </h:form>
                </p:tab>
            </p:tabView>
           
        </ui:composition>
        
    </h:body>
</html>
